#pragma once

#include <tuple>
#include <vector>


namespace cudaEsg
{
	using namespace std;

	class ESGSet {
	
	public:
		int id;
		int universesCount = 0;
		int companiesCount;
		int indicatorsCount=0;
		int weightsMatricesCount=0;

		float* h_indicatorsRatings=nullptr;

		vector<tuple<int, unsigned char*>> *universes = nullptr;
		unsigned char *attributes = nullptr;
		unsigned char *hostAttributes = nullptr;


		float *indicators_scores = nullptr;
		float *scores = nullptr;
		float *aggregatedWeights = nullptr;
		vector<tuple<int, float*>> *weightsMatrices = nullptr;
		vector<tuple<int, unsigned char*>> *profiles = nullptr;
		vector<tuple<int, float*>> *modifiers = nullptr;
		vector<tuple<int, float*>> *issueWeights = nullptr;


		int* company_flags = nullptr;
		int* company_flag_types = nullptr;
		int flags_types_count = 2;

		int clusterGroupHeadsCount = 0;
		int* h_clusterGroupHeads = nullptr;

		int groupHeadsCount = 0;
		//int *d_groupHeads = nullptr;

		int h_configEsgHeadsCount=0;
		unsigned char* h_configEgsHeads = nullptr;

		int h_configDisjunctClustersHeadsCount=0;
		unsigned char* h_configDisjunctClustersHeads = nullptr;

		int h_configDisjunctClustersMapCount=0;
		unsigned char* h_configDisjunctClustersMap = nullptr;

		unsigned char CLUSTERS_COUNT = 8;
		unsigned char DISJUNCT_CLUSTERS_COUNT = 4;
	

		float* GetMatrix(int matrixId) const;
		unsigned char* GetProfiles(int matrixId) const;
		float* GetIssuesWeights(int matrixId) const;
		float* GetCombinationModifier(int matrixId) const;
		void AddMatrix(int matrixId, float * matrixAddress,unsigned char* profiles) const;
		void AddIssuesWeights(int matrixId, float* weights) const;
		void AddCombinationModifiers(int matrixId, float* modifiers) const;
		unsigned char* GetUniverse(int universeId) const;
		void AddUniverse(int universeId, unsigned char * universeAddress) const;
		ESGSet();
		ESGSet(int setId,int companiesCount);
		~ESGSet();
	};
}
